package com.youdianstar.app.common.util

import com.youdianstar.app.common.Language


/**
 * File: LanguageConfig
 * Author: 82149 Create: 2022/5/26 16:57
 * Changes (from 2022/5/26)
 * --------------------------------------------------
 * description:
 * ---------------------------------------------------
 *
 */
class LanguageConfig {
    companion object {

        val instance by lazy { LanguageConfig() }

    }

    /**
     * 保存设置语言
     */
    fun saveLanguageCode(language: String){
        SPUtil.getInstance().put(Language.CONFIGLANGUAGE,language)
    }

    /**
     * 获取设置语言
     */
    fun getLanguageCode():String{
        return SPUtil.getInstance().getString(Language.CONFIGLANGUAGE,LanguageUtils.getDefaultLanguageCode())}


}